package unit13;

import java.util.HashMap;
import java.util.Map;

public class MapTest {
	public static void main(String[] args) {
		Map<String, Employee> staff=new HashMap<>();
		staff.put("001", new Employee("Alice"));
		staff.put("002", new Employee("Kim"));
		staff.put("003", new Employee("Tony"));
		staff.put("004", new Employee("Jemmy"));
		
		System.out.println(staff);
		
		staff.remove("002");
		
		staff.put("003", new Employee("Ben"));
		System.out.println(staff.get("003"));
		for(Map.Entry<String, Employee> entry:staff.entrySet()){
			String key=entry.getKey();
			Employee value=entry.getValue();
			System.out.println("key="+key+"value="+value);
		}
	}
}
